{% extends 'layout/base.html' %}

{% block content %}
<div class="row mt-5">
    <div class="col-lg-2"></div>
    <div class="col-lg">
        <h2>Import Zones</h2>

        <form action="{{ url_for('dns.zones_export') }}" method="post">
            <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
            <input type="hidden" name="tags" value="snitch-dns-tag-that-should-never-exist-no-really-i-mean-it">
            <input type="hidden" name="search" value="">
            <a href="#" class="submit-on-click">For the expected CSV format, please click here.</a>
        </form>
        <div class="text-warning small">If you are planning to upload a file with thousands of rows, consider using the CLI instead.</div>

        <form action="{{ url_for('dns.zones_import_upload') }}" method="post" enctype="multipart/form-data" class="pt-3">
            <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">

            <div class="form-group">
                <label for="csvfile">Upload CSV file</label>
                <div class="row">
                    <div class="col">
                        <div class="custom-file">
                            <input type="file" class="custom-file-input" id="csvfile" name="csvfile" required>
                            <label class="custom-file-label" for="csvfile">Choose file</label>
                        </div>
                    </div>
                    <div class="col-1">
                        <button type="submit" class="btn btn-primary">Upload</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <div class="col-lg-2"></div>
</div>
{% endblock %}